07. Constructing Links

The power of the web is that pages can lead to other pages. When you click on a link on a web page, it takes you to another page. This link is called a hyperlink.

Hyperlinks are created with anchor elements, which generally look like:

<a href="https://www.udacity.com">Udacity</a>

and render on the page like this: Udacity.

Inside the opening a tag there is href, which stands for "reference." This is called an attribute. Attributes like href describe the properties of HTML elements. In this case, the href attribute is the target URL that the link will open. The content inside the anchor element is the text that users see displayed on the page.

This is the format that you must use when you make hyperlinks! Note:

  • There is a space between a and href.
  • There are no spaces around the =.
  • The website has two " around it.
  • There are no spaces between the href attribute and the > of the opening tag.

How to Complete this Quiz

For this quiz, I want you to make your first hyperlink! On the next quiz, I'll give you a URL and the text that needs to be displayed. It will be your job to write the link!

Constructing Links

QUESTION:

Type in a link that points to https://www.google.com and displays as Google.

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer